package com.chs.recoginition.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.redis.core.RedisHash;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @Author CHS
 * @Date 2022/8/31 17:10
 * @Version 1.0
 * 生存周期一个月
 **/
@Data
@NoArgsConstructor
@AllArgsConstructor
@RedisHash(value = "webSocketMessage",timeToLive = 2592000L)
public class WebSocketMessageResult implements Serializable {
    private static final long serialVersionUID = 777258584384738004L;

    /**
     * 标识符
     */
    @Id
    private Integer id;

    /**
     * 频道编号
     */
    private String channelNum;

    /**
     * 消息类型
     */
    private String type;

    /**
     * 用户openID
     */
    private String userOpenId;

    /**
     * 用户昵称
     */
    private String userNickName;

    /**
     * 头像路径
     */
    private String userAvatarUrl;

    /**
     * 最高分
     */
    private Integer maxScore;

    /**
     * 用户消息
     */
    private String msg;

    /**
     * 发送时间
     */
    private LocalDateTime sendDateTime;
}
